Multithreading is commonly used to enhance the performance of modern microprocessors and programming languages. Multithreading may be defined as the logical separation of a processing task into independent threads, which are activated individually and require limited interaction or synchronization between threads. In a pipelined processor, for example, the pipeline stages may be controlled to process two or more threads in alternation and thus use the pipeline resources more efficiently.
U.S. Patent Application Publication US 2003/0046517 A1, whose disclosure is incorporated herein by reference, describes apparatus for facilitating multithreading in a computer processor pipeline. A logic element is inserted into a pipeline stage to separate it into first and second substages. A control mechanism controls the first and second substages so that the first substage can process an operation from a first thread, and the second substage can simultaneously process a second operation from a second thread.
U.S. Patent Application Publication US 2003/0135716 A1, whose disclosure is incorporated herein by reference, describes a method for converting a computer processor configuration having a k-phased pipeline into a virtual multithreaded processor. For this purpose, each pipeline phase of the processor configuration is divided into a plurality of sub-phases, and at least one virtual pipeline with k sub-phases is created within the pipeline. In this manner, a single physical processor can be made to operate as multiple virtual processors, each equivalent to the original processor.